package com.card.entity.manager;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import com.card.entity.object.EntityObject;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * ClassName: SampleUser <br/>
 * Function: 样本数据. <br/>
 * date: 2018年12月11日 上午10:49:18 <br/>
 * 
 * @author lishuai11
 * @version
 * @since JDK 1.8
 */
@ApiModel
@Entity
@Table(name = "`USER_SCORE`")
@EntityListeners(AuditingEntityListener.class)
public class UserScore extends EntityObject {

	private static final long serialVersionUID = 2528890098805684542L;

	public UserScore() {
		super();
	}

	public UserScore(int userId, String source, int score, boolean add) {
		super();
		this.userId = userId;
		this.source = source;
		this.score = score;
		this.add = add;
	}

	@ApiModelProperty(name = "userScoreId", value = "主键")
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "`USER_SCORE_ID`")
	private int userScoreId;

	@ApiModelProperty(name = "userId", value = "用户id")
	@Column(name = "`USER_ID`", nullable = false, updatable = false)
	private int userId;

	@ApiModelProperty(name = "source", value = "活动名称(SA0001：邀请注册；SA0002：开卡；SA0003：兑换礼物)")
	@Column(name = "`SOURCE`", nullable = false, updatable = false)
	private String source;

	@ApiModelProperty(name = "score", value = "积分")
	@Column(name = "`SCORE`", nullable = false, updatable = false)
	private int score;

	@ApiModelProperty(name = "add", value = "是否增加")
	@Column(name = "`ADD`", nullable = false, updatable = false)
	private boolean add;

	/**
	 * @return the userScoreId
	 */
	public int getUserScoreId() {
		return userScoreId;
	}

	/**
	 * @param userScoreId
	 *            the userScoreId to set
	 */
	public void setUserScoreId(int userScoreId) {
		this.userScoreId = userScoreId;
	}

	/**
	 * @return the userId
	 */
	public int getUserId() {
		return userId;
	}

	/**
	 * @param userId
	 *            the userId to set
	 */
	public void setUserId(int userId) {
		this.userId = userId;
	}

	/**
	 * @return the source
	 */
	public String getSource() {
		return source;
	}

	/**
	 * @param source
	 *            the source to set
	 */
	public void setSource(String source) {
		this.source = source;
	}

	/**
	 * @return the score
	 */
	public int getScore() {
		return score;
	}

	/**
	 * @param score
	 *            the score to set
	 */
	public void setScore(int score) {
		this.score = score;
	}

	/**
	 * @return the add
	 */
	public boolean isAdd() {
		return add;
	}

	/**
	 * @param add
	 *            the add to set
	 */
	public void setAdd(boolean add) {
		this.add = add;
	}

}
